
#!/usr/bin/env python
# coding=utf-8
# Created by han on 2016/5/23
# import json
# inp_str = '{"k1":123, "k2": "wupeiqi"}'
# inp_list=json.loads(inp_str)
# print(inp_list['k1'])
# l=[1,2,3,4,5]

# f=open('haproxy.cfg','r',encoding='utf-8')
# while True:
#     i=f.readline()
#     if i:
#         print(i,type(i))
#     else:
#         break

# file1='haproxy.cfg'
# file2='haproxy.cfg.bak'
#
#
# def modifiy_file(arg1,arg2):
#     with open(arg1,'r',) as har_file,open(arg2,'w',) as haw_file:
#         modi_flag = False
#         while True:
#             ha_line = har_file.readline()
#             if ha_line:
#                 if "www.oldboy.org" in ha_line:
#                     modi_flag = True
#                     haw_file.write(ha_line)
#                     continue
#                 if modi_flag:
#                     if ha_line[:7] != "backend":
#                         haw_file.write(ha_line)
#                         haw_file.write(ha_line)
#                     else:
#                         haw_file.write(ha_line)
#                         modi_flag = False
#                         continue
#                 else:
#                     haw_file.write(ha_line)
#             else:
#                 break
#
# modifiy_file(file1,file2)

# with open(file1,'r') as f1,open(file2,'w') as f2:
#     time=0
#     for line in f1:
#         print(type(line))
#         if time <   10:
#             time+=1
#             f2.write(line)
#         else:
#             break

import json

user = input("输入： ")
print(type(user))
read = json.loads(user)
backend = read['backend']
record = read['record']
print(backend)
print(record)